package com.evildog.workspace.life.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.life.application.bo.*;
import com.evildog.workspace.life.application.dto.PhotoDTO;
import com.evildog.workspace.life.application.dto.PhotoListDTO;
import com.evildog.workspace.life.application.dto.PhotoPageDTO;
import com.evildog.workspace.life.application.dto.PhotoStarDTO;
import com.evildog.workspace.life.application.entity.Photo;
import com.evildog.workspace.life.application.entity.PhotoListDO;
import com.evildog.workspace.life.application.entity.PhotoPageDO;
import com.evildog.workspace.life.application.entity.PhotoTag;
import com.evildog.workspace.life.application.model.PhotoListParam;
import com.evildog.workspace.life.application.model.PhotoParam;
import com.evildog.workspace.life.application.model.PhotoStarParam;
import com.evildog.workspace.life.application.vo.AlbumsPhotoVO;
import com.evildog.workspace.life.application.vo.PhotoListVO;
import com.evildog.workspace.life.application.vo.PhotoPageVO;
import com.evildog.workspace.life.application.vo.PhotoVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.Collection;
import java.util.List;

@Mapper
public interface PhotoConvert {

    PhotoConvert INSTANCE = Mappers.getMapper(PhotoConvert.class);

    PhotoListDTO convert(PhotoListParam photoListParam);

    PhotoDTO convert(PhotoParam photoParam);

    @Mapping(target = "isDeleted", ignore = true)
    Photo convert(PhotoDTO photoDTO);

    PhotoPageDO convert(PhotoPageDTO photoPageDTO);

    PhotoVO convert(PhotoBO photoBO);

    PhotoBO convert(Photo photo);

    List<PhotoListBO> convert(List<PhotoListDO> photoList);

    List<PhotoListVO> convertVoList(List<PhotoListBO> photoListBO);

    @Mappings({})
    PagedResult<PhotoPageBO> convert(IPage<PhotoPageDO> page);

    PagedResult<PhotoPageVO> convert(PagedResult<PhotoPageBO> page);

    List<AlbumsPhotoVO> convertVO(List<AlbumsPhotoBO> photoListBO);

    List<PhotoListBO> convert(Collection<PhotoListDO> list);

    List<PhotoTagBO> convertBoList(List<PhotoTag> mapList);

    PhotoStarDTO convert(PhotoStarParam wishParam);

}